<?php
class ORMpz_ecom_purchase {
  public function toObj($args) {
    $obj = new stdClass();
    if (isset($args->track_id)) {
      $obj->track_id =  $args->track_id;
    }
    if (isset($args->date_added)) {
      $obj->date_added =  $args->date_added;
    }
    if (isset($args->date_last_mod)) {
      $obj->date_last_mod =  $args->date_last_mod;
    }
    if (isset($args->customer_id)) {
      $obj->customer_id =  $args->customer_id;
    }
    if (isset($args->order_id)) {
      $obj->order_id =  $args->order_id;
    }
    if (isset($args->product_id)) {
      $obj->product_id =  $args->product_id;
    }
    if (isset($args->name)) {
      $obj->name =  $args->name;
    }
    if (isset($args->price)) {
      $obj->price =  $args->price;
    }
    if (isset($args->quantity)) {
      $obj->quantity =  $args->quantity;
    }
    if (isset($args->total)) {
      $obj->total =  $args->total;
    }
    if (isset($args->ship_req)) {
      $obj->ship_req =  $args->ship_req;
    }
    return $obj;
  }
}
?>
